package com.springboot.experiment2;

/**
 * author 陈伯瑞
 * date 2020/4/12 0012 13:31
 * version 1.0
 **/

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationEvent;

/**
 自定义事件*/

public class NoticeEvent extends ApplicationEvent {

    private  static  final Logger logger= LoggerFactory.getLogger(NoticeEvent.class);
    /**
     * 存储信息
     */
    private final  String message;

    public  NoticeEvent(String message){
        super(message);
        this.message=message;
        logger.info("添加事件成功！message：{}",message);

    }
    public  String getMessage(){return message;}
}
